home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / include / net / RCS / if_arp.h,v < prev    next >
Encoding:
Text File  |  1990-11-30  |  3.5 KB  |  163 lines

  1. head     1.5;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.5
  10. date     90.11.29.19.39.48;  author kupfer;  state Exp;
  11. branches ;
  12. next     1.4;
  13.  
  14. 1.4
  15. date     89.11.28.11.49.05;  author ouster;  state Exp;
  16. branches ;
  17. next     1.3;
  18.  
  19. 1.3
  20. date     89.01.06.06.40.43;  author rab;  state Exp;
  21. branches ;
  22. next     1.2;
  23.  
  24. 1.2
  25. date     88.06.29.15.14.05;  author ouster;  state Exp;
  26. branches ;
  27. next     1.1;
  28.  
  29. 1.1
  30. date     88.06.21.16.56.36;  author ouster;  state Exp;
  31. branches ;
  32. next     ;
  33.  
  34.  
  35. desc
  36. @@
  37.  
  38.  
  39. 1.5
  40. log
  41. @Include <sys/socket.h>
  42. @
  43. text
  44. @/*
  45.  * Copyright (c) 1986 Regents of the University of California.
  46.  * All rights reserved.
  47.  *
  48.  * Redistribution and use in source and binary forms are permitted
  49.  * provided that this notice is preserved and that due credit is given
  50.  * to the University of California at Berkeley. The name of the University
  51.  * may not be used to endorse or promote products derived from this
  52.  * software without specific prior written permission. This software
  53.  * is provided ``as is'' without express or implied warranty.
  54.  *
  55.  *    @@(#)if_arp.h    7.2 (Berkeley) 12/30/87
  56.  * $Header$
  57.  */
  58.  
  59. #ifndef _IF_ARP
  60. #define _IF_ARP
  61.  
  62. #include <sys/socket.h>
  63.  
  64. /*
  65.  * Address Resolution Protocol.
  66.  *
  67.  * See RFC 826 for protocol description.  ARP packets are variable
  68.  * in size; the arphdr structure defines the fixed-length portion.
  69.  * Protocol type values are the same as those for 10 Mb/s Ethernet.
  70.  * It is followed by the variable-sized fields ar_sha, arp_spa,
  71.  * arp_tha and arp_tpa in that order, according to the lengths
  72.  * specified.  Field names used correspond to RFC 826.
  73.  */
  74. struct    arphdr {
  75.     u_short    ar_hrd;        /* format of hardware address */
  76. #define ARPHRD_ETHER     1    /* ethernet hardware address */
  77.     u_short    ar_pro;        /* format of protocol address */
  78.     u_char    ar_hln;        /* length of hardware address */
  79.     u_char    ar_pln;        /* length of protocol address */
  80.     u_short    ar_op;        /* one of: */
  81. #define    ARPOP_REQUEST    1    /* request to resolve address */
  82. #define    ARPOP_REPLY    2    /* response to previous request */
  83. #define REVARP_REQUEST    3    /* request for reverse ARP */
  84. #define REVARP_REPLY    4    /* response to RARP request */
  85. /*
  86.  * The remaining fields are variable in size, according to the
  87.  * sizes above, and are defined on a network-by-network basis.
  88.  * For example, see <netinet/if_ether.h> for Ethernet-to-and-from-IP
  89.  * translation.
  90.  */
  91. #if 0
  92.     u_char    ar_sha[];    /* sender hardware address */
  93.     u_char    ar_spa[];    /* sender protocol address */
  94.     u_char    ar_tha[];    /* target hardware address */
  95.     u_char    ar_tpa[];    /* target protocol address */
  96. #endif
  97. };
  98.  
  99. /*
  100.  * ARP ioctl request
  101.  */
  102. struct arpreq {
  103.     struct    sockaddr arp_pa;        /* protocol address */
  104.     struct    sockaddr arp_ha;        /* hardware address */
  105.     int    arp_flags;            /* flags */
  106. };
  107. /*  arp_flags and at_flags field values */
  108. #define    ATF_INUSE    0x01    /* entry in use */
  109. #define ATF_COM        0x02    /* completed entry (enaddr valid) */
  110. #define    ATF_PERM    0x04    /* permanent entry */
  111. #define    ATF_PUBL    0x08    /* publish entry (respond for other host) */
  112. #define    ATF_USETRAILERS    0x10    /* has requested trailers */
  113.  
  114. #endif _IF_ARP
  115. @
  116.  
  117.  
  118. 1.4
  119. log
  120. @Added RARP-related information.
  121. @
  122. text
  123. @d13 1
  124. d18 2
  125. @
  126.  
  127.  
  128. 1.3
  129. log
  130. @fixed nested comments.
  131. @
  132. text
  133. @d37 2
  134. d40 4
  135. a43 2
  136.  * The remaining fields are variable in size,
  137.  * according to the sizes above.
  138. @
  139.  
  140.  
  141. 1.2
  142. log
  143. @Add ifdefs so files won't be processed twice.
  144. @
  145. text
  146. @d41 6
  147. a46 4
  148. /*    u_char    ar_sha[];    /* sender hardware address */
  149. /*    u_char    ar_spa[];    /* sender protocol address */
  150. /*    u_char    ar_tha[];    /* target hardware address */
  151. /*    u_char    ar_tpa[];    /* target protocol address */
  152. @
  153.  
  154.  
  155. 1.1
  156. log
  157. @Initial revision
  158. @
  159. text
  160. @d15 3
  161. d61 2
  162. @
  163.